package presentationTier.actions;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import presentationTier.MainForm;

/**
 * Trida obstaravajici obsluhu kliknuti na jTable
 * @author vojta
 */
public class JTableAction implements MouseListener{

    MainForm form;

    public JTableAction(MainForm aThis) {
        form = aThis;
    }

    /**
     * Pri dvojkliku otevre dialog na upravu filmu
     * @param e
     */
    public void mouseClicked(MouseEvent e) {
        if (e.getClickCount() == 2){
            ChangeMovieMenuItemAction a = new ChangeMovieMenuItemAction(form);
            a.actionPerformed(null);
        }
    }

    public void mousePressed(MouseEvent e) {
        e.consume();
    }

    public void mouseReleased(MouseEvent e) {
        e.consume();
    }

    public void mouseEntered(MouseEvent e) {
        e.consume();
    }

    public void mouseExited(MouseEvent e) {
        e.consume();
    }

}
